{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'Z0 Z1': 8.0, 'X0 X1': 16.0, '': 6.0, 'X0': 10.0}\n"
     ]
    }
   ],
   "source": [
    "from pyqpanda import *\n",
    "from pyqpanda.utils import *\n",
    "from pyqpanda.Hamiltonian import PauliOperator\n",
    "from pyqpanda.Algorithm.hamiltonian_simulation import *\n",
    "\n",
    "H1={'Z0 Z1':4,'X0 X1':8}\n",
    "H1=PauliOperator(H1)\n",
    "H2={'':3,'X0':5}\n",
    "H2=PauliOperator(H2)\n",
    "H=2*H1+H2*2\n",
    "print(H)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
